package com.yjy.fuyao.stu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yjy.fuyao.stu.entity.CourseDescription;
import com.yjy.fuyao.stu.mapper.CourseDescriptionMapper;
import com.yjy.fuyao.stu.service.CourseDescriptionService;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 课程简介 服务实现类
 * </p>
 *
 * @author yjy
 * @since 2021-08-16
 */
@Service
public class CourseDescriptionServiceImpl extends ServiceImpl<CourseDescriptionMapper, CourseDescription> implements CourseDescriptionService {

    @Override
    public boolean removeByCourseId(String courseId) {
        QueryWrapper<CourseDescription> courseDescriptionQueryWrapper = new QueryWrapper<>();
        courseDescriptionQueryWrapper.eq("id",courseId);
        Integer result = baseMapper.delete(courseDescriptionQueryWrapper);
        return null != result && result > 0;
    }
}
